package ru.arriah.common.ejb.help;

import java.io.*;

public class PrimaryKey implements Serializable {
   public Integer id;

   public PrimaryKey() {
      super();
      id = null;
   }

   public PrimaryKey(String id) {
      super();
      this.id = new Integer(id);
   }

   public boolean equals(Object primaryKey) {
      return
         id != null && primaryKey != null ?
         id.toString().equals(primaryKey.toString()) :
         false;
   }

   public int hashCode() {
      return id != null ? id.hashCode() : super.hashCode();
   }

   public String toString() {
      return id != null ? id.toString() : "null";
   }
}
